package 蓝桥杯;

import java.math.BigDecimal;
import java.util.Scanner;

/**
 * 阶乘计算
 *
 * @author yang
 * @date 2021/12/23
 */
public class 阶乘计算 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        BigDecimal res = new BigDecimal(1);
        for (int i = 2; i <= n; i++) {
            res = res.multiply(new BigDecimal(i));
        }
        System.out.println(res);
    }
}
